/*
 * 供应商加盟采集报名相关API
 */
import * as API from "./api";

/**
 * 提交供应商报名信息
 * @param {Object} data 供应商报名数据
 */
export const submitSupplierRegistrationAPI = (data) => {
  return API.POST('/admin/supplier-registration/submitRegistration', data);
};

/**
 * 分页查询供应商报名信息列表
 * @param {Object} params 查询参数 {currentPage, pageSize, supplierName, project, expertiseType, approvalStatus}
 */
export const getSupplierRegistrationListAPI = (params) => {
  return API.GET('/admin/supplier-registration/getRegistrationList', params);
};

/**
 * 根据ID查询供应商报名信息
 * @param {Number} id 供应商报名信息ID
 */
export const getSupplierRegistrationByIdAPI = (id) => {
  return API.GET(`/admin/supplier-registration/select/${id}`);
};

/**
 * 修改供应商报名信息
 * @param {Number} id 供应商报名信息ID
 * @param {Object} data 供应商报名数据
 */
export const updateSupplierRegistrationAPI = (id, data) => {
  return API.POST(`/admin/supplier-registration/update/${id}`, data);
};

/**
 * 删除供应商报名信息
 * @param {Number} id 供应商报名信息ID
 */
export const deleteSupplierRegistrationAPI = (id) => {
  return API.POST(`/admin/supplier-registration/delete/${id}`);
};